// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
// the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
// an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
// specific language governing permissions and limitations under the License.

//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by google-apis-code-generator 1.5.1
//     C# generator version: 1.22.0
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

/**
 * \brief
 *   Fusion Tables API Version v2
 *
 * \section ApiInfo API Version Information
 *    <table>
 *      <tr><th>API
 *          <td><a href='https://developers.google.com/fusiontables'>Fusion Tables API</a>
 *      <tr><th>API Version<td>v2
 *      <tr><th>API Rev<td>20160526 (511)
 *      <tr><th>API Docs
 *          <td><a href='https://developers.google.com/fusiontables'>
 *              https://developers.google.com/fusiontables</a>
 *      <tr><th>Discovery Name<td>fusiontables
 *    </table>
 *
 * \section ForMoreInfo For More Information
 *
 * The complete API documentation for using Fusion Tables API can be found at
 * <a href='https://developers.google.com/fusiontables'>https://developers.google.com/fusiontables</a>.
 *
 * For more information about the Google APIs Client Library for .NET, see
 * <a href='https://developers.google.com/api-client-library/dotnet/get_started'>
 * https://developers.google.com/api-client-library/dotnet/get_started</a>
 */

namespace Google.Apis.Fusiontables.v2
{
    /// <summary>The Fusiontables Service.</summary>
    public class FusiontablesService : Google.Apis.Services.BaseClientService
    {
        /// <summary>The API version.</summary>
        public const string Version = "v2";

        /// <summary>The discovery version used to generate this service.</summary>
        public static Google.Apis.Discovery.DiscoveryVersion DiscoveryVersionUsed =
            Google.Apis.Discovery.DiscoveryVersion.Version_1_0;

        /// <summary>Constructs a new service.</summary>
        public FusiontablesService() :
            this(new Google.Apis.Services.BaseClientService.Initializer()) {}

        /// <summary>Constructs a new service.</summary>
        /// <param name="initializer">The service initializer.</param>
        public FusiontablesService(Google.Apis.Services.BaseClientService.Initializer initializer)
            : base(initializer)
        {
            column = new ColumnResource(this);
            query = new QueryResource(this);
            style = new StyleResource(this);
            table = new TableResource(this);
            task = new TaskResource(this);
            template = new TemplateResource(this);
        }

        /// <summary>Gets the service supported features.</summary>
        public override System.Collections.Generic.IList<string> Features
        {
            get { return new string[0]; }
        }

        /// <summary>Gets the service name.</summary>
        public override string Name
        {
            get { return "fusiontables"; }
        }

        /// <summary>Gets the service base URI.</summary>
        public override string BaseUri
        {
            get { return "https://www.googleapis.com/fusiontables/v2/"; }
        }

        /// <summary>Gets the service base path.</summary>
        public override string BasePath
        {
            get { return "fusiontables/v2/"; }
        }

        /// <summary>Available OAuth 2.0 scopes for use with the Fusion Tables API.</summary>
        public class Scope
        {
            /// <summary>Manage your Fusion Tables</summary>
            public static string Fusiontables = "https://www.googleapis.com/auth/fusiontables";

            /// <summary>View your Fusion Tables</summary>
            public static string FusiontablesReadonly = "https://www.googleapis.com/auth/fusiontables.readonly";

        }



        private readonly ColumnResource column;

        /// <summary>Gets the Column resource.</summary>
        public virtual ColumnResource Column
        {
            get { return column; }
        }

        private readonly QueryResource query;

        /// <summary>Gets the Query resource.</summary>
        public virtual QueryResource Query
        {
            get { return query; }
        }

        private readonly StyleResource style;

        /// <summary>Gets the Style resource.</summary>
        public virtual StyleResource Style
        {
            get { return style; }
        }

        private readonly TableResource table;

        /// <summary>Gets the Table resource.</summary>
        public virtual TableResource Table
        {
            get { return table; }
        }

        private readonly TaskResource task;

        /// <summary>Gets the Task resource.</summary>
        public virtual TaskResource Task
        {
            get { return task; }
        }

        private readonly TemplateResource template;

        /// <summary>Gets the Template resource.</summary>
        public virtual TemplateResource Template
        {
            get { return template; }
        }
    }

    ///<summary>A base abstract class for Fusiontables requests.</summary>
    public abstract class FusiontablesBaseServiceRequest<TResponse> : Google.Apis.Requests.ClientServiceRequest<TResponse>
    {
        ///<summary>Constructs a new FusiontablesBaseServiceRequest instance.</summary>
        protected FusiontablesBaseServiceRequest(Google.Apis.Services.IClientService service)
            : base(service)
        {
        }

        /// <summary>Data format for the response.</summary>
        /// [default: json]
        [Google.Apis.Util.RequestParameterAttribute("alt", Google.Apis.Util.RequestParameterType.Query)]
        public virtual System.Nullable<AltEnum> Alt { get; set; }

        /// <summary>Data format for the response.</summary>
        public enum AltEnum
        {
            /// <summary>Responses with Content-Type of text/csv</summary>
            [Google.Apis.Util.StringValueAttribute("csv")]
            Csv,
            /// <summary>Responses with Content-Type of application/json</summary>
            [Google.Apis.Util.StringValueAttribute("json")]
            Json,
        }

        /// <summary>Selector specifying which fields to include in a partial response.</summary>
        [Google.Apis.Util.RequestParameterAttribute("fields", Google.Apis.Util.RequestParameterType.Query)]
        public virtual string Fields { get; set; }

        /// <summary>API key. Your API key identifies your project and provides you with API access, quota, and reports.
        /// Required unless you provide an OAuth 2.0 token.</summary>
        [Google.Apis.Util.RequestParameterAttribute("key", Google.Apis.Util.RequestParameterType.Query)]
        public virtual string Key { get; set; }

        /// <summary>OAuth 2.0 token for the current user.</summary>
        [Google.Apis.Util.RequestParameterAttribute("oauth_token", Google.Apis.Util.RequestParameterType.Query)]
        public virtual string OauthToken { get; set; }

        /// <summary>Returns response with indentations and line breaks.</summary>
        /// [default: true]
        [Google.Apis.Util.RequestParameterAttribute("prettyPrint", Google.Apis.Util.RequestParameterType.Query)]
        public virtual System.Nullable<bool> PrettyPrint { get; set; }

        /// <summary>Available to use for quota purposes for server-side applications. Can be any arbitrary string
        /// assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.</summary>
        [Google.Apis.Util.RequestParameterAttribute("quotaUser", Google.Apis.Util.RequestParameterType.Query)]
        public virtual string QuotaUser { get; set; }

        /// <summary>IP address of the site where the request originates. Use this if you want to enforce per-user
        /// limits.</summary>
        [Google.Apis.Util.RequestParameterAttribute("userIp", Google.Apis.Util.RequestParameterType.Query)]
        public virtual string UserIp { get; set; }

        /// <summary>Initializes Fusiontables parameter list.</summary>
        protected override void InitParameters()
        {
            base.InitParameters();

            RequestParameters.Add(
                "alt", new Google.Apis.Discovery.Parameter
                {
                    Name = "alt",
                    IsRequired = false,
                    ParameterType = "query",
                    DefaultValue = "json",
                    Pattern = null,
                });
            RequestParameters.Add(
                "fields", new Google.Apis.Discovery.Parameter
                {
                    Name = "fields",
                    IsRequired = false,
                    ParameterType = "query",
                    DefaultValue = null,
                    Pattern = null,
                });
            RequestParameters.Add(
                "key", new Google.Apis.Discovery.Parameter
                {
                    Name = "key",
                    IsRequired = false,
                    ParameterType = "query",
                    DefaultValue = null,
                    Pattern = null,
                });
            RequestParameters.Add(
                "oauth_token", new Google.Apis.Discovery.Parameter
                {
                    Name = "oauth_token",
                    IsRequired = false,
                    ParameterType = "query",
                    DefaultValue = null,
                    Pattern = null,
                });
            RequestParameters.Add(
                "prettyPrint", new Google.Apis.Discovery.Parameter
                {
                    Name = "prettyPrint",
                    IsRequired = false,
                    ParameterType = "query",
                    DefaultValue = "true",
                    Pattern = null,
                });
            RequestParameters.Add(
                "quotaUser", new Google.Apis.Discovery.Parameter
                {
                    Name = "quotaUser",
                    IsRequired = false,
                    ParameterType = "query",
                    DefaultValue = null,
                    Pattern = null,
                });
            RequestParameters.Add(
                "userIp", new Google.Apis.Discovery.Parameter
                {
                    Name = "userIp",
                    IsRequired = false,
                    ParameterType = "query",
                    DefaultValue = null,
                    Pattern = null,
                });
        }
    }

    /// <summary>The "column" collection of methods.</summary>
    public class ColumnResource
    {
        private const string Resource = "column";

        /// <summary>The service which this resource belongs to.</summary>
        private readonly Google.Apis.Services.IClientService service;

        /// <summary>Constructs a new resource.</summary>
        public ColumnResource(Google.Apis.Services.IClientService service)
        {
            this.service = service;

        }


        /// <summary>Deletes the specified column.</summary>
        /// <param name="tableId">Table from which the column is being deleted.</param>
        /// <param name="columnId">Name or
        /// identifier for the column being deleted.</param>
        public virtual DeleteRequest Delete(string tableId, string columnId)
        {
            return new DeleteRequest(service, tableId, columnId);
        }

        /// <summary>Deletes the specified column.</summary>
        public class DeleteRequest : FusiontablesBaseServiceRequest<string>
        {
            /// <summary>Constructs a new Delete request.</summary>
            public DeleteRequest(Google.Apis.Services.IClientService service, string tableId, string columnId)
                : base(service)
            {
                TableId = tableId;
                ColumnId = columnId;
                InitParameters();
            }


            /// <summary>Table from which the column is being deleted.</summary>
            [Google.Apis.Util.RequestParameterAttribute("tableId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string TableId { get; private set; }

            /// <summary>Name or identifier for the column being deleted.</summary>
            [Google.Apis.Util.RequestParameterAttribute("columnId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string ColumnId { get; private set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "delete"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "DELETE"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "tables/{tableId}/columns/{columnId}"; }
            }

            /// <summary>Initializes Delete parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "tableId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "tableId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "columnId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "columnId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Retrieves a specific column by its ID.</summary>
        /// <param name="tableId">Table to which the column belongs.</param>
        /// <param name="columnId">Name or identifier
        /// for the column that is being requested.</param>
        public virtual GetRequest Get(string tableId, string columnId)
        {
            return new GetRequest(service, tableId, columnId);
        }

        /// <summary>Retrieves a specific column by its ID.</summary>
        public class GetRequest : FusiontablesBaseServiceRequest<Google.Apis.Fusiontables.v2.Data.Column>
        {
            /// <summary>Constructs a new Get request.</summary>
            public GetRequest(Google.Apis.Services.IClientService service, string tableId, string columnId)
                : base(service)
            {
                TableId = tableId;
                ColumnId = columnId;
                InitParameters();
            }


            /// <summary>Table to which the column belongs.</summary>
            [Google.Apis.Util.RequestParameterAttribute("tableId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string TableId { get; private set; }

            /// <summary>Name or identifier for the column that is being requested.</summary>
            [Google.Apis.Util.RequestParameterAttribute("columnId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string ColumnId { get; private set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "get"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "GET"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "tables/{tableId}/columns/{columnId}"; }
            }

            /// <summary>Initializes Get parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "tableId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "tableId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "columnId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "columnId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Adds a new column to the table.</summary>
        /// <param name="body">The body of the request.</param>
        /// <param name="tableId">Table for which a new column is being added.</param>
        public virtual InsertRequest Insert(Google.Apis.Fusiontables.v2.Data.Column body, string tableId)
        {
            return new InsertRequest(service, body, tableId);
        }

        /// <summary>Adds a new column to the table.</summary>
        public class InsertRequest : FusiontablesBaseServiceRequest<Google.Apis.Fusiontables.v2.Data.Column>
        {
            /// <summary>Constructs a new Insert request.</summary>
            public InsertRequest(Google.Apis.Services.IClientService service, Google.Apis.Fusiontables.v2.Data.Column body, string tableId)
                : base(service)
            {
                TableId = tableId;
                Body = body;
                InitParameters();
            }


            /// <summary>Table for which a new column is being added.</summary>
            [Google.Apis.Util.RequestParameterAttribute("tableId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string TableId { get; private set; }


            /// <summary>Gets or sets the body of this request.</summary>
            Google.Apis.Fusiontables.v2.Data.Column Body { get; set; }

            ///<summary>Returns the body of the request.</summary>
            protected override object GetBody() { return Body; }

            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "insert"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "POST"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "tables/{tableId}/columns"; }
            }

            /// <summary>Initializes Insert parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "tableId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "tableId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Retrieves a list of columns.</summary>
        /// <param name="tableId">Table whose columns are being listed.</param>
        public virtual ListRequest List(string tableId)
        {
            return new ListRequest(service, tableId);
        }

        /// <summary>Retrieves a list of columns.</summary>
        public class ListRequest : FusiontablesBaseServiceRequest<Google.Apis.Fusiontables.v2.Data.ColumnList>
        {
            /// <summary>Constructs a new List request.</summary>
            public ListRequest(Google.Apis.Services.IClientService service, string tableId)
                : base(service)
            {
                TableId = tableId;
                InitParameters();
            }


            /// <summary>Table whose columns are being listed.</summary>
            [Google.Apis.Util.RequestParameterAttribute("tableId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string TableId { get; private set; }

            /// <summary>Maximum number of columns to return. Default is 5.</summary>
            /// [minimum: 0]
            [Google.Apis.Util.RequestParameterAttribute("maxResults", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<long> MaxResults { get; set; }

            /// <summary>Continuation token specifying which result page to return.</summary>
            [Google.Apis.Util.RequestParameterAttribute("pageToken", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string PageToken { get; set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "list"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "GET"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "tables/{tableId}/columns"; }
            }

            /// <summary>Initializes List parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "tableId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "tableId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "maxResults", new Google.Apis.Discovery.Parameter
                    {
                        Name = "maxResults",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "pageToken", new Google.Apis.Discovery.Parameter
                    {
                        Name = "pageToken",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Updates the name or type of an existing column. This method supports patch semantics.</summary>
        /// <param name="body">The body of the request.</param>
        /// <param name="tableId">Table for which the column is being updated.</param>
        /// <param name="columnId">Name or
        /// identifier for the column that is being updated.</param>
        public virtual PatchRequest Patch(Google.Apis.Fusiontables.v2.Data.Column body, string tableId, string columnId)
        {
            return new PatchRequest(service, body, tableId, columnId);
        }

        /// <summary>Updates the name or type of an existing column. This method supports patch semantics.</summary>
        public class PatchRequest : FusiontablesBaseServiceRequest<Google.Apis.Fusiontables.v2.Data.Column>
        {
            /// <summary>Constructs a new Patch request.</summary>
            public PatchRequest(Google.Apis.Services.IClientService service, Google.Apis.Fusiontables.v2.Data.Column body, string tableId, string columnId)
                : base(service)
            {
                TableId = tableId;
                ColumnId = columnId;
                Body = body;
                InitParameters();
            }


            /// <summary>Table for which the column is being updated.</summary>
            [Google.Apis.Util.RequestParameterAttribute("tableId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string TableId { get; private set; }

            /// <summary>Name or identifier for the column that is being updated.</summary>
            [Google.Apis.Util.RequestParameterAttribute("columnId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string ColumnId { get; private set; }


            /// <summary>Gets or sets the body of this request.</summary>
            Google.Apis.Fusiontables.v2.Data.Column Body { get; set; }

            ///<summary>Returns the body of the request.</summary>
            protected override object GetBody() { return Body; }

            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "patch"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "PATCH"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "tables/{tableId}/columns/{columnId}"; }
            }

            /// <summary>Initializes Patch parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "tableId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "tableId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "columnId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "columnId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Updates the name or type of an existing column.</summary>
        /// <param name="body">The body of the request.</param>
        /// <param name="tableId">Table for which the column is being updated.</param>
        /// <param name="columnId">Name or
        /// identifier for the column that is being updated.</param>
        public virtual UpdateRequest Update(Google.Apis.Fusiontables.v2.Data.Column body, string tableId, string columnId)
        {
            return new UpdateRequest(service, body, tableId, columnId);
        }

        /// <summary>Updates the name or type of an existing column.</summary>
        public class UpdateRequest : FusiontablesBaseServiceRequest<Google.Apis.Fusiontables.v2.Data.Column>
        {
            /// <summary>Constructs a new Update request.</summary>
            public UpdateRequest(Google.Apis.Services.IClientService service, Google.Apis.Fusiontables.v2.Data.Column body, string tableId, string columnId)
                : base(service)
            {
                TableId = tableId;
                ColumnId = columnId;
                Body = body;
                InitParameters();
            }


            /// <summary>Table for which the column is being updated.</summary>
            [Google.Apis.Util.RequestParameterAttribute("tableId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string TableId { get; private set; }

            /// <summary>Name or identifier for the column that is being updated.</summary>
            [Google.Apis.Util.RequestParameterAttribute("columnId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string ColumnId { get; private set; }


            /// <summary>Gets or sets the body of this request.</summary>
            Google.Apis.Fusiontables.v2.Data.Column Body { get; set; }

            ///<summary>Returns the body of the request.</summary>
            protected override object GetBody() { return Body; }

            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "update"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "PUT"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "tables/{tableId}/columns/{columnId}"; }
            }

            /// <summary>Initializes Update parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "tableId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "tableId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "columnId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "columnId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }
    }

    /// <summary>The "query" collection of methods.</summary>
    public class QueryResource
    {
        private const string Resource = "query";

        /// <summary>The service which this resource belongs to.</summary>
        private readonly Google.Apis.Services.IClientService service;

        /// <summary>Constructs a new resource.</summary>
        public QueryResource(Google.Apis.Services.IClientService service)
        {
            this.service = service;

        }


        /// <summary>Executes a Fusion Tables SQL statement, which can be any of - SELECT - INSERT - UPDATE - DELETE -
        /// SHOW - DESCRIBE - CREATE statement.</summary>
        /// <param name="sql">A Fusion Tables SQL statement, which can be any of - SELECT - INSERT - UPDATE - DELETE - SHOW -
        /// DESCRIBE - CREATE</param>
        public virtual SqlRequest Sql(string sql)
        {
            return new SqlRequest(service, sql);
        }

        /// <summary>Executes a Fusion Tables SQL statement, which can be any of - SELECT - INSERT - UPDATE - DELETE -
        /// SHOW - DESCRIBE - CREATE statement.</summary>
        public class SqlRequest : FusiontablesBaseServiceRequest<Google.Apis.Fusiontables.v2.Data.Sqlresponse>
        {
            /// <summary>Constructs a new Sql request.</summary>
            public SqlRequest(Google.Apis.Services.IClientService service, string sql)
                : base(service)
            {
                Sql = sql;
                MediaDownloader = new Google.Apis.Download.MediaDownloader(service);
                InitParameters();
            }


            /// <summary>A Fusion Tables SQL statement, which can be any of - SELECT - INSERT - UPDATE - DELETE - SHOW -
            /// DESCRIBE - CREATE</summary>
            [Google.Apis.Util.RequestParameterAttribute("sql", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string Sql { get; private set; }

            /// <summary>Whether column names are included in the first row. Default is true.</summary>
            [Google.Apis.Util.RequestParameterAttribute("hdrs", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<bool> Hdrs { get; set; }

            /// <summary>Whether typed values are returned in the (JSON) response: numbers for numeric values and parsed
            /// geometries for KML values. Default is true.</summary>
            [Google.Apis.Util.RequestParameterAttribute("typed", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<bool> Typed { get; set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "sql"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "POST"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "query"; }
            }

            /// <summary>Initializes Sql parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "sql", new Google.Apis.Discovery.Parameter
                    {
                        Name = "sql",
                        IsRequired = true,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "hdrs", new Google.Apis.Discovery.Parameter
                    {
                        Name = "hdrs",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "typed", new Google.Apis.Discovery.Parameter
                    {
                        Name = "typed",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

            /// <summary>Gets the media downloader.</summary>
            public Google.Apis.Download.IMediaDownloader MediaDownloader { get; private set; }

            /// <summary>Synchronously download the media into the given stream.</summary>
            public virtual void Download(System.IO.Stream stream)
            {
                MediaDownloader.Download(this.GenerateRequestUri(), stream);
            }

            /// <summary>Asynchronously download the media into the given stream.</summary>
            public virtual System.Threading.Tasks.Task<Google.Apis.Download.IDownloadProgress> DownloadAsync(System.IO.Stream stream)
            {
                return MediaDownloader.DownloadAsync(this.GenerateRequestUri(), stream);
            }

            /// <summary>Asynchronously download the media into the given stream.</summary>
            public virtual System.Threading.Tasks.Task<Google.Apis.Download.IDownloadProgress> DownloadAsync(System.IO.Stream stream,
                System.Threading.CancellationToken cancellationToken)
            {
                return MediaDownloader.DownloadAsync(this.GenerateRequestUri(), stream, cancellationToken);
            }

        }

        /// <summary>Executes a SQL statement which can be any of - SELECT - SHOW - DESCRIBE</summary>
        /// <param name="sql">A SQL statement which can be any of - SELECT - SHOW - DESCRIBE</param>
        public virtual SqlGetRequest SqlGet(string sql)
        {
            return new SqlGetRequest(service, sql);
        }

        /// <summary>Executes a SQL statement which can be any of - SELECT - SHOW - DESCRIBE</summary>
        public class SqlGetRequest : FusiontablesBaseServiceRequest<Google.Apis.Fusiontables.v2.Data.Sqlresponse>
        {
            /// <summary>Constructs a new SqlGet request.</summary>
            public SqlGetRequest(Google.Apis.Services.IClientService service, string sql)
                : base(service)
            {
                Sql = sql;
                MediaDownloader = new Google.Apis.Download.MediaDownloader(service);
                InitParameters();
            }


            /// <summary>A SQL statement which can be any of - SELECT - SHOW - DESCRIBE</summary>
            [Google.Apis.Util.RequestParameterAttribute("sql", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string Sql { get; private set; }

            /// <summary>Whether column names are included (in the first row). Default is true.</summary>
            [Google.Apis.Util.RequestParameterAttribute("hdrs", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<bool> Hdrs { get; set; }

            /// <summary>Whether typed values are returned in the (JSON) response: numbers for numeric values and parsed
            /// geometries for KML values. Default is true.</summary>
            [Google.Apis.Util.RequestParameterAttribute("typed", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<bool> Typed { get; set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "sqlGet"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "GET"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "query"; }
            }

            /// <summary>Initializes SqlGet parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "sql", new Google.Apis.Discovery.Parameter
                    {
                        Name = "sql",
                        IsRequired = true,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "hdrs", new Google.Apis.Discovery.Parameter
                    {
                        Name = "hdrs",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "typed", new Google.Apis.Discovery.Parameter
                    {
                        Name = "typed",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

            /// <summary>Gets the media downloader.</summary>
            public Google.Apis.Download.IMediaDownloader MediaDownloader { get; private set; }

            /// <summary>Synchronously download the media into the given stream.</summary>
            public virtual void Download(System.IO.Stream stream)
            {
                MediaDownloader.Download(this.GenerateRequestUri(), stream);
            }

            /// <summary>Asynchronously download the media into the given stream.</summary>
            public virtual System.Threading.Tasks.Task<Google.Apis.Download.IDownloadProgress> DownloadAsync(System.IO.Stream stream)
            {
                return MediaDownloader.DownloadAsync(this.GenerateRequestUri(), stream);
            }

            /// <summary>Asynchronously download the media into the given stream.</summary>
            public virtual System.Threading.Tasks.Task<Google.Apis.Download.IDownloadProgress> DownloadAsync(System.IO.Stream stream,
                System.Threading.CancellationToken cancellationToken)
            {
                return MediaDownloader.DownloadAsync(this.GenerateRequestUri(), stream, cancellationToken);
            }

        }
    }

    /// <summary>The "style" collection of methods.</summary>
    public class StyleResource
    {
        private const string Resource = "style";

        /// <summary>The service which this resource belongs to.</summary>
        private readonly Google.Apis.Services.IClientService service;

        /// <summary>Constructs a new resource.</summary>
        public StyleResource(Google.Apis.Services.IClientService service)
        {
            this.service = service;

        }


        /// <summary>Deletes a style.</summary>
        /// <param name="tableId">Table from which the style is being deleted</param>
        /// <param name="styleId">Identifier
        /// (within a table) for the style being deleted</param>
        public virtual DeleteRequest Delete(string tableId, int styleId)
        {
            return new DeleteRequest(service, tableId, styleId);
        }

        /// <summary>Deletes a style.</summary>
        public class DeleteRequest : FusiontablesBaseServiceRequest<string>
        {
            /// <summary>Constructs a new Delete request.</summary>
            public DeleteRequest(Google.Apis.Services.IClientService service, string tableId, int styleId)
                : base(service)
            {
                TableId = tableId;
                StyleId = styleId;
                InitParameters();
            }


            /// <summary>Table from which the style is being deleted</summary>
            [Google.Apis.Util.RequestParameterAttribute("tableId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string TableId { get; private set; }

            /// <summary>Identifier (within a table) for the style being deleted</summary>
            [Google.Apis.Util.RequestParameterAttribute("styleId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual int StyleId { get; private set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "delete"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "DELETE"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "tables/{tableId}/styles/{styleId}"; }
            }

            /// <summary>Initializes Delete parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "tableId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "tableId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "styleId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "styleId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Gets a specific style.</summary>
        /// <param name="tableId">Table to which the requested style belongs</param>
        /// <param name="styleId">Identifier
        /// (integer) for a specific style in a table</param>
        public virtual GetRequest Get(string tableId, int styleId)
        {
            return new GetRequest(service, tableId, styleId);
        }

        /// <summary>Gets a specific style.</summary>
        public class GetRequest : FusiontablesBaseServiceRequest<Google.Apis.Fusiontables.v2.Data.StyleSetting>
        {
            /// <summary>Constructs a new Get request.</summary>
            public GetRequest(Google.Apis.Services.IClientService service, string tableId, int styleId)
                : base(service)
            {
                TableId = tableId;
                StyleId = styleId;
                InitParameters();
            }


            /// <summary>Table to which the requested style belongs</summary>
            [Google.Apis.Util.RequestParameterAttribute("tableId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string TableId { get; private set; }

            /// <summary>Identifier (integer) for a specific style in a table</summary>
            [Google.Apis.Util.RequestParameterAttribute("styleId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual int StyleId { get; private set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "get"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "GET"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "tables/{tableId}/styles/{styleId}"; }
            }

            /// <summary>Initializes Get parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "tableId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "tableId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "styleId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "styleId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Adds a new style for the table.</summary>
        /// <param name="body">The body of the request.</param>
        /// <param name="tableId">Table for which a new style is being added</param>
        public virtual InsertRequest Insert(Google.Apis.Fusiontables.v2.Data.StyleSetting body, string tableId)
        {
            return new InsertRequest(service, body, tableId);
        }

        /// <summary>Adds a new style for the table.</summary>
        public class InsertRequest : FusiontablesBaseServiceRequest<Google.Apis.Fusiontables.v2.Data.StyleSetting>
        {
            /// <summary>Constructs a new Insert request.</summary>
            public InsertRequest(Google.Apis.Services.IClientService service, Google.Apis.Fusiontables.v2.Data.StyleSetting body, string tableId)
                : base(service)
            {
                TableId = tableId;
                Body = body;
                InitParameters();
            }


            /// <summary>Table for which a new style is being added</summary>
            [Google.Apis.Util.RequestParameterAttribute("tableId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string TableId { get; private set; }


            /// <summary>Gets or sets the body of this request.</summary>
            Google.Apis.Fusiontables.v2.Data.StyleSetting Body { get; set; }

            ///<summary>Returns the body of the request.</summary>
            protected override object GetBody() { return Body; }

            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "insert"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "POST"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "tables/{tableId}/styles"; }
            }

            /// <summary>Initializes Insert parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "tableId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "tableId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Retrieves a list of styles.</summary>
        /// <param name="tableId">Table whose styles are being listed</param>
        public virtual ListRequest List(string tableId)
        {
            return new ListRequest(service, tableId);
        }

        /// <summary>Retrieves a list of styles.</summary>
        public class ListRequest : FusiontablesBaseServiceRequest<Google.Apis.Fusiontables.v2.Data.StyleSettingList>
        {
            /// <summary>Constructs a new List request.</summary>
            public ListRequest(Google.Apis.Services.IClientService service, string tableId)
                : base(service)
            {
                TableId = tableId;
                InitParameters();
            }


            /// <summary>Table whose styles are being listed</summary>
            [Google.Apis.Util.RequestParameterAttribute("tableId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string TableId { get; private set; }

            /// <summary>Maximum number of styles to return. Optional. Default is 5.</summary>
            /// [minimum: 0]
            [Google.Apis.Util.RequestParameterAttribute("maxResults", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<long> MaxResults { get; set; }

            /// <summary>Continuation token specifying which result page to return. Optional.</summary>
            [Google.Apis.Util.RequestParameterAttribute("pageToken", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string PageToken { get; set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "list"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "GET"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "tables/{tableId}/styles"; }
            }

            /// <summary>Initializes List parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "tableId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "tableId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "maxResults", new Google.Apis.Discovery.Parameter
                    {
                        Name = "maxResults",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "pageToken", new Google.Apis.Discovery.Parameter
                    {
                        Name = "pageToken",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Updates an existing style. This method supports patch semantics.</summary>
        /// <param name="body">The body of the request.</param>
        /// <param name="tableId">Table whose style is being updated.</param>
        /// <param name="styleId">Identifier (within a
        /// table) for the style being updated.</param>
        public virtual PatchRequest Patch(Google.Apis.Fusiontables.v2.Data.StyleSetting body, string tableId, int styleId)
        {
            return new PatchRequest(service, body, tableId, styleId);
        }

        /// <summary>Updates an existing style. This method supports patch semantics.</summary>
        public class PatchRequest : FusiontablesBaseServiceRequest<Google.Apis.Fusiontables.v2.Data.StyleSetting>
        {
            /// <summary>Constructs a new Patch request.</summary>
            public PatchRequest(Google.Apis.Services.IClientService service, Google.Apis.Fusiontables.v2.Data.StyleSetting body, string tableId, int styleId)
                : base(service)
            {
                TableId = tableId;
                StyleId = styleId;
                Body = body;
                InitParameters();
            }


            /// <summary>Table whose style is being updated.</summary>
            [Google.Apis.Util.RequestParameterAttribute("tableId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string TableId { get; private set; }

            /// <summary>Identifier (within a table) for the style being updated.</summary>
            [Google.Apis.Util.RequestParameterAttribute("styleId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual int StyleId { get; private set; }


            /// <summary>Gets or sets the body of this request.</summary>
            Google.Apis.Fusiontables.v2.Data.StyleSetting Body { get; set; }

            ///<summary>Returns the body of the request.</summary>
            protected override object GetBody() { return Body; }

            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "patch"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "PATCH"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "tables/{tableId}/styles/{styleId}"; }
            }

            /// <summary>Initializes Patch parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "tableId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "tableId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "styleId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "styleId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Updates an existing style.</summary>
        /// <param name="body">The body of the request.</param>
        /// <param name="tableId">Table whose style is being updated.</param>
        /// <param name="styleId">Identifier (within a
        /// table) for the style being updated.</param>
        public virtual UpdateRequest Update(Google.Apis.Fusiontables.v2.Data.StyleSetting body, string tableId, int styleId)
        {
            return new UpdateRequest(service, body, tableId, styleId);
        }

        /// <summary>Updates an existing style.</summary>
        public class UpdateRequest : FusiontablesBaseServiceRequest<Google.Apis.Fusiontables.v2.Data.StyleSetting>
        {
            /// <summary>Constructs a new Update request.</summary>
            public UpdateRequest(Google.Apis.Services.IClientService service, Google.Apis.Fusiontables.v2.Data.StyleSetting body, string tableId, int styleId)
                : base(service)
            {
                TableId = tableId;
                StyleId = styleId;
                Body = body;
                InitParameters();
            }


            /// <summary>Table whose style is being updated.</summary>
            [Google.Apis.Util.RequestParameterAttribute("tableId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string TableId { get; private set; }

            /// <summary>Identifier (within a table) for the style being updated.</summary>
            [Google.Apis.Util.RequestParameterAttribute("styleId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual int StyleId { get; private set; }


            /// <summary>Gets or sets the body of this request.</summary>
            Google.Apis.Fusiontables.v2.Data.StyleSetting Body { get; set; }

            ///<summary>Returns the body of the request.</summary>
            protected override object GetBody() { return Body; }

            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "update"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "PUT"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "tables/{tableId}/styles/{styleId}"; }
            }

            /// <summary>Initializes Update parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "tableId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "tableId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "styleId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "styleId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }
    }

    /// <summary>The "table" collection of methods.</summary>
    public class TableResource
    {
        private const string Resource = "table";

        /// <summary>The service which this resource belongs to.</summary>
        private readonly Google.Apis.Services.IClientService service;

        /// <summary>Constructs a new resource.</summary>
        public TableResource(Google.Apis.Services.IClientService service)
        {
            this.service = service;

        }


        /// <summary>Copies a table.</summary>
        /// <param name="tableId">ID of the table that is being copied.</param>
        public virtual CopyRequest Copy(string tableId)
        {
            return new CopyRequest(service, tableId);
        }

        /// <summary>Copies a table.</summary>
        public class CopyRequest : FusiontablesBaseServiceRequest<Google.Apis.Fusiontables.v2.Data.Table>
        {
            /// <summary>Constructs a new Copy request.</summary>
            public CopyRequest(Google.Apis.Services.IClientService service, string tableId)
                : base(service)
            {
                TableId = tableId;
                InitParameters();
            }


            /// <summary>ID of the table that is being copied.</summary>
            [Google.Apis.Util.RequestParameterAttribute("tableId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string TableId { get; private set; }

            /// <summary>Whether to also copy tabs, styles, and templates. Default is false.</summary>
            [Google.Apis.Util.RequestParameterAttribute("copyPresentation", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<bool> CopyPresentation { get; set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "copy"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "POST"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "tables/{tableId}/copy"; }
            }

            /// <summary>Initializes Copy parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "tableId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "tableId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "copyPresentation", new Google.Apis.Discovery.Parameter
                    {
                        Name = "copyPresentation",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Deletes a table.</summary>
        /// <param name="tableId">ID of the table to be deleted.</param>
        public virtual DeleteRequest Delete(string tableId)
        {
            return new DeleteRequest(service, tableId);
        }

        /// <summary>Deletes a table.</summary>
        public class DeleteRequest : FusiontablesBaseServiceRequest<string>
        {
            /// <summary>Constructs a new Delete request.</summary>
            public DeleteRequest(Google.Apis.Services.IClientService service, string tableId)
                : base(service)
            {
                TableId = tableId;
                InitParameters();
            }


            /// <summary>ID of the table to be deleted.</summary>
            [Google.Apis.Util.RequestParameterAttribute("tableId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string TableId { get; private set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "delete"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "DELETE"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "tables/{tableId}"; }
            }

            /// <summary>Initializes Delete parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "tableId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "tableId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Retrieves a specific table by its ID.</summary>
        /// <param name="tableId">Identifier for the table being requested.</param>
        public virtual GetRequest Get(string tableId)
        {
            return new GetRequest(service, tableId);
        }

        /// <summary>Retrieves a specific table by its ID.</summary>
        public class GetRequest : FusiontablesBaseServiceRequest<Google.Apis.Fusiontables.v2.Data.Table>
        {
            /// <summary>Constructs a new Get request.</summary>
            public GetRequest(Google.Apis.Services.IClientService service, string tableId)
                : base(service)
            {
                TableId = tableId;
                InitParameters();
            }


            /// <summary>Identifier for the table being requested.</summary>
            [Google.Apis.Util.RequestParameterAttribute("tableId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string TableId { get; private set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "get"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "GET"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "tables/{tableId}"; }
            }

            /// <summary>Initializes Get parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "tableId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "tableId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Imports more rows into a table.</summary>
        /// <param name="tableId">The table into which new rows are being imported.</param>
        public virtual ImportRowsRequest ImportRows(string tableId)
        {
            return new ImportRowsRequest(service, tableId);
        }

        /// <summary>Imports more rows into a table.</summary>
        public class ImportRowsRequest : FusiontablesBaseServiceRequest<Google.Apis.Fusiontables.v2.Data.Import>
        {
            /// <summary>Constructs a new ImportRows request.</summary>
            public ImportRowsRequest(Google.Apis.Services.IClientService service, string tableId)
                : base(service)
            {
                TableId = tableId;
                InitParameters();
            }


            /// <summary>The table into which new rows are being imported.</summary>
            [Google.Apis.Util.RequestParameterAttribute("tableId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string TableId { get; private set; }

            /// <summary>The delimiter used to separate cell values. This can only consist of a single character.
            /// Default is ,.</summary>
            [Google.Apis.Util.RequestParameterAttribute("delimiter", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string Delimiter { get; set; }

            /// <summary>The encoding of the content. Default is UTF-8. Use auto-detect if you are unsure of the
            /// encoding.</summary>
            [Google.Apis.Util.RequestParameterAttribute("encoding", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string Encoding { get; set; }

            /// <summary>The index of the line up to which data will be imported. Default is to import the entire file.
            /// If endLine is negative, it is an offset from the end of the file; the imported content will exclude the
            /// last endLine lines.</summary>
            [Google.Apis.Util.RequestParameterAttribute("endLine", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<int> EndLine { get; set; }

            /// <summary>Whether the imported CSV must have the same number of values for each row. If false, rows with
            /// fewer values will be padded with empty values. Default is true.</summary>
            [Google.Apis.Util.RequestParameterAttribute("isStrict", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<bool> IsStrict { get; set; }

            /// <summary>The index of the first line from which to start importing, inclusive. Default is 0.</summary>
            [Google.Apis.Util.RequestParameterAttribute("startLine", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<int> StartLine { get; set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "importRows"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "POST"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "tables/{tableId}/import"; }
            }

            /// <summary>Initializes ImportRows parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "tableId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "tableId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "delimiter", new Google.Apis.Discovery.Parameter
                    {
                        Name = "delimiter",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "encoding", new Google.Apis.Discovery.Parameter
                    {
                        Name = "encoding",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "endLine", new Google.Apis.Discovery.Parameter
                    {
                        Name = "endLine",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "isStrict", new Google.Apis.Discovery.Parameter
                    {
                        Name = "isStrict",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "startLine", new Google.Apis.Discovery.Parameter
                    {
                        Name = "startLine",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Imports more rows into a table.</summary>

        /// <param name="tableId">The table into which new rows are being imported.</param>
        /// <param name="stream">The stream to upload.</param>
        /// <param name="contentType">The content type of the stream to upload.</param>
        public virtual ImportRowsMediaUpload ImportRows(string tableId, System.IO.Stream stream, string contentType)
        {
            return new ImportRowsMediaUpload(service, tableId, stream, contentType);
        }

        /// <summary>ImportRows media upload which supports resumable upload.</summary>
        public class ImportRowsMediaUpload : Google.Apis.Upload.ResumableUpload<string, Google.Apis.Fusiontables.v2.Data.Import>
        {

            /// <summary>Data format for the response.</summary>
            /// [default: json]
            [Google.Apis.Util.RequestParameterAttribute("alt", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<AltEnum> Alt { get; set; }

            /// <summary>Data format for the response.</summary>
            public enum AltEnum
            {
                /// <summary>Responses with Content-Type of text/csv</summary>
                [Google.Apis.Util.StringValueAttribute("csv")]
                Csv,
                /// <summary>Responses with Content-Type of application/json</summary>
                [Google.Apis.Util.StringValueAttribute("json")]
                Json,
            }

            /// <summary>Selector specifying which fields to include in a partial response.</summary>
            [Google.Apis.Util.RequestParameterAttribute("fields", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string Fields { get; set; }

            /// <summary>API key. Your API key identifies your project and provides you with API access, quota, and
            /// reports. Required unless you provide an OAuth 2.0 token.</summary>
            [Google.Apis.Util.RequestParameterAttribute("key", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string Key { get; set; }

            /// <summary>OAuth 2.0 token for the current user.</summary>
            [Google.Apis.Util.RequestParameterAttribute("oauth_token", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string OauthToken { get; set; }

            /// <summary>Returns response with indentations and line breaks.</summary>
            /// [default: true]
            [Google.Apis.Util.RequestParameterAttribute("prettyPrint", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<bool> PrettyPrint { get; set; }

            /// <summary>Available to use for quota purposes for server-side applications. Can be any arbitrary string
            /// assigned to a user, but should not exceed 40 characters. Overrides userIp if both are
            /// provided.</summary>
            [Google.Apis.Util.RequestParameterAttribute("quotaUser", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string QuotaUser { get; set; }

            /// <summary>IP address of the site where the request originates. Use this if you want to enforce per-user
            /// limits.</summary>
            [Google.Apis.Util.RequestParameterAttribute("userIp", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string UserIp { get; set; }


            /// <summary>The table into which new rows are being imported.</summary>
            [Google.Apis.Util.RequestParameterAttribute("tableId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string TableId { get; private set; }

            /// <summary>The delimiter used to separate cell values. This can only consist of a single character.
            /// Default is ,.</summary>
            [Google.Apis.Util.RequestParameterAttribute("delimiter", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string Delimiter { get; set; }

            /// <summary>The encoding of the content. Default is UTF-8. Use auto-detect if you are unsure of the
            /// encoding.</summary>
            [Google.Apis.Util.RequestParameterAttribute("encoding", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string Encoding { get; set; }

            /// <summary>The index of the line up to which data will be imported. Default is to import the entire file.
            /// If endLine is negative, it is an offset from the end of the file; the imported content will exclude the
            /// last endLine lines.</summary>
            [Google.Apis.Util.RequestParameterAttribute("endLine", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<int> EndLine { get; set; }

            /// <summary>Whether the imported CSV must have the same number of values for each row. If false, rows with
            /// fewer values will be padded with empty values. Default is true.</summary>
            [Google.Apis.Util.RequestParameterAttribute("isStrict", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<bool> IsStrict { get; set; }

            /// <summary>The index of the first line from which to start importing, inclusive. Default is 0.</summary>
            [Google.Apis.Util.RequestParameterAttribute("startLine", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<int> StartLine { get; set; }

            /// <summary>Constructs a new ImportRows media upload instance.</summary>
            public ImportRowsMediaUpload(Google.Apis.Services.IClientService service, string
             tableId, System.IO.Stream stream, string contentType)
                : base(service, string.Format("/{0}/{1}{2}", "upload", service.BasePath, "tables/{tableId}/import"), "POST", stream, contentType)
            {
                TableId = tableId;
            }
        }

        /// <summary>Imports a new table.</summary>
        /// <param name="name">The name to be assigned to the new table.</param>
        public virtual ImportTableRequest ImportTable(string name)
        {
            return new ImportTableRequest(service, name);
        }

        /// <summary>Imports a new table.</summary>
        public class ImportTableRequest : FusiontablesBaseServiceRequest<Google.Apis.Fusiontables.v2.Data.Table>
        {
            /// <summary>Constructs a new ImportTable request.</summary>
            public ImportTableRequest(Google.Apis.Services.IClientService service, string name)
                : base(service)
            {
                Name = name;
                InitParameters();
            }


            /// <summary>The name to be assigned to the new table.</summary>
            [Google.Apis.Util.RequestParameterAttribute("name", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string Name { get; private set; }

            /// <summary>The delimiter used to separate cell values. This can only consist of a single character.
            /// Default is ,.</summary>
            [Google.Apis.Util.RequestParameterAttribute("delimiter", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string Delimiter { get; set; }

            /// <summary>The encoding of the content. Default is UTF-8. Use auto-detect if you are unsure of the
            /// encoding.</summary>
            [Google.Apis.Util.RequestParameterAttribute("encoding", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string Encoding { get; set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "importTable"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "POST"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "tables/import"; }
            }

            /// <summary>Initializes ImportTable parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "name", new Google.Apis.Discovery.Parameter
                    {
                        Name = "name",
                        IsRequired = true,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "delimiter", new Google.Apis.Discovery.Parameter
                    {
                        Name = "delimiter",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "encoding", new Google.Apis.Discovery.Parameter
                    {
                        Name = "encoding",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Imports a new table.</summary>

        /// <param name="name">The name to be assigned to the new table.</param>
        /// <param name="stream">The stream to upload.</param>
        /// <param name="contentType">The content type of the stream to upload.</param>
        public virtual ImportTableMediaUpload ImportTable(string name, System.IO.Stream stream, string contentType)
        {
            return new ImportTableMediaUpload(service, name, stream, contentType);
        }

        /// <summary>ImportTable media upload which supports resumable upload.</summary>
        public class ImportTableMediaUpload : Google.Apis.Upload.ResumableUpload<string, Google.Apis.Fusiontables.v2.Data.Table>
        {

            /// <summary>Data format for the response.</summary>
            /// [default: json]
            [Google.Apis.Util.RequestParameterAttribute("alt", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<AltEnum> Alt { get; set; }

            /// <summary>Data format for the response.</summary>
            public enum AltEnum
            {
                /// <summary>Responses with Content-Type of text/csv</summary>
                [Google.Apis.Util.StringValueAttribute("csv")]
                Csv,
                /// <summary>Responses with Content-Type of application/json</summary>
                [Google.Apis.Util.StringValueAttribute("json")]
                Json,
            }

            /// <summary>Selector specifying which fields to include in a partial response.</summary>
            [Google.Apis.Util.RequestParameterAttribute("fields", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string Fields { get; set; }

            /// <summary>API key. Your API key identifies your project and provides you with API access, quota, and
            /// reports. Required unless you provide an OAuth 2.0 token.</summary>
            [Google.Apis.Util.RequestParameterAttribute("key", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string Key { get; set; }

            /// <summary>OAuth 2.0 token for the current user.</summary>
            [Google.Apis.Util.RequestParameterAttribute("oauth_token", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string OauthToken { get; set; }

            /// <summary>Returns response with indentations and line breaks.</summary>
            /// [default: true]
            [Google.Apis.Util.RequestParameterAttribute("prettyPrint", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<bool> PrettyPrint { get; set; }

            /// <summary>Available to use for quota purposes for server-side applications. Can be any arbitrary string
            /// assigned to a user, but should not exceed 40 characters. Overrides userIp if both are
            /// provided.</summary>
            [Google.Apis.Util.RequestParameterAttribute("quotaUser", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string QuotaUser { get; set; }

            /// <summary>IP address of the site where the request originates. Use this if you want to enforce per-user
            /// limits.</summary>
            [Google.Apis.Util.RequestParameterAttribute("userIp", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string UserIp { get; set; }


            /// <summary>The name to be assigned to the new table.</summary>
            [Google.Apis.Util.RequestParameterAttribute("name", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string Name { get; private set; }

            /// <summary>The delimiter used to separate cell values. This can only consist of a single character.
            /// Default is ,.</summary>
            [Google.Apis.Util.RequestParameterAttribute("delimiter", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string Delimiter { get; set; }

            /// <summary>The encoding of the content. Default is UTF-8. Use auto-detect if you are unsure of the
            /// encoding.</summary>
            [Google.Apis.Util.RequestParameterAttribute("encoding", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string Encoding { get; set; }

            /// <summary>Constructs a new ImportTable media upload instance.</summary>
            public ImportTableMediaUpload(Google.Apis.Services.IClientService service, string
             name, System.IO.Stream stream, string contentType)
                : base(service, string.Format("/{0}/{1}{2}", "upload", service.BasePath, "tables/import"), "POST", stream, contentType)
            {
                Name = name;
            }
        }

        /// <summary>Creates a new table.</summary>
        /// <param name="body">The body of the request.</param>
        public virtual InsertRequest Insert(Google.Apis.Fusiontables.v2.Data.Table body)
        {
            return new InsertRequest(service, body);
        }

        /// <summary>Creates a new table.</summary>
        public class InsertRequest : FusiontablesBaseServiceRequest<Google.Apis.Fusiontables.v2.Data.Table>
        {
            /// <summary>Constructs a new Insert request.</summary>
            public InsertRequest(Google.Apis.Services.IClientService service, Google.Apis.Fusiontables.v2.Data.Table body)
                : base(service)
            {
                Body = body;
                InitParameters();
            }



            /// <summary>Gets or sets the body of this request.</summary>
            Google.Apis.Fusiontables.v2.Data.Table Body { get; set; }

            ///<summary>Returns the body of the request.</summary>
            protected override object GetBody() { return Body; }

            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "insert"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "POST"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "tables"; }
            }

            /// <summary>Initializes Insert parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

            }

        }

        /// <summary>Retrieves a list of tables a user owns.</summary>
        public virtual ListRequest List()
        {
            return new ListRequest(service);
        }

        /// <summary>Retrieves a list of tables a user owns.</summary>
        public class ListRequest : FusiontablesBaseServiceRequest<Google.Apis.Fusiontables.v2.Data.TableList>
        {
            /// <summary>Constructs a new List request.</summary>
            public ListRequest(Google.Apis.Services.IClientService service)
                : base(service)
            {
                InitParameters();
            }


            /// <summary>Maximum number of tables to return. Default is 5.</summary>
            /// [minimum: 0]
            [Google.Apis.Util.RequestParameterAttribute("maxResults", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<long> MaxResults { get; set; }

            /// <summary>Continuation token specifying which result page to return.</summary>
            [Google.Apis.Util.RequestParameterAttribute("pageToken", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string PageToken { get; set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "list"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "GET"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "tables"; }
            }

            /// <summary>Initializes List parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "maxResults", new Google.Apis.Discovery.Parameter
                    {
                        Name = "maxResults",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "pageToken", new Google.Apis.Discovery.Parameter
                    {
                        Name = "pageToken",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Updates an existing table. Unless explicitly requested, only the name, description, and attribution
        /// will be updated. This method supports patch semantics.</summary>
        /// <param name="body">The body of the request.</param>
        /// <param name="tableId">ID of the table that is being updated.</param>
        public virtual PatchRequest Patch(Google.Apis.Fusiontables.v2.Data.Table body, string tableId)
        {
            return new PatchRequest(service, body, tableId);
        }

        /// <summary>Updates an existing table. Unless explicitly requested, only the name, description, and attribution
        /// will be updated. This method supports patch semantics.</summary>
        public class PatchRequest : FusiontablesBaseServiceRequest<Google.Apis.Fusiontables.v2.Data.Table>
        {
            /// <summary>Constructs a new Patch request.</summary>
            public PatchRequest(Google.Apis.Services.IClientService service, Google.Apis.Fusiontables.v2.Data.Table body, string tableId)
                : base(service)
            {
                TableId = tableId;
                Body = body;
                InitParameters();
            }


            /// <summary>ID of the table that is being updated.</summary>
            [Google.Apis.Util.RequestParameterAttribute("tableId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string TableId { get; private set; }

            /// <summary>Whether the view definition is also updated. The specified view definition replaces the
            /// existing one. Only a view can be updated with a new definition.</summary>
            [Google.Apis.Util.RequestParameterAttribute("replaceViewDefinition", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<bool> ReplaceViewDefinition { get; set; }


            /// <summary>Gets or sets the body of this request.</summary>
            Google.Apis.Fusiontables.v2.Data.Table Body { get; set; }

            ///<summary>Returns the body of the request.</summary>
            protected override object GetBody() { return Body; }

            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "patch"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "PATCH"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "tables/{tableId}"; }
            }

            /// <summary>Initializes Patch parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "tableId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "tableId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "replaceViewDefinition", new Google.Apis.Discovery.Parameter
                    {
                        Name = "replaceViewDefinition",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Replaces rows of an existing table. Current rows remain visible until all replacement rows are
        /// ready.</summary>
        /// <param name="tableId">Table whose rows will be replaced.</param>
        public virtual ReplaceRowsRequest ReplaceRows(string tableId)
        {
            return new ReplaceRowsRequest(service, tableId);
        }

        /// <summary>Replaces rows of an existing table. Current rows remain visible until all replacement rows are
        /// ready.</summary>
        public class ReplaceRowsRequest : FusiontablesBaseServiceRequest<Google.Apis.Fusiontables.v2.Data.Task>
        {
            /// <summary>Constructs a new ReplaceRows request.</summary>
            public ReplaceRowsRequest(Google.Apis.Services.IClientService service, string tableId)
                : base(service)
            {
                TableId = tableId;
                InitParameters();
            }


            /// <summary>Table whose rows will be replaced.</summary>
            [Google.Apis.Util.RequestParameterAttribute("tableId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string TableId { get; private set; }

            /// <summary>The delimiter used to separate cell values. This can only consist of a single character.
            /// Default is ,.</summary>
            [Google.Apis.Util.RequestParameterAttribute("delimiter", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string Delimiter { get; set; }

            /// <summary>The encoding of the content. Default is UTF-8. Use 'auto-detect' if you are unsure of the
            /// encoding.</summary>
            [Google.Apis.Util.RequestParameterAttribute("encoding", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string Encoding { get; set; }

            /// <summary>The index of the line up to which data will be imported. Default is to import the entire file.
            /// If endLine is negative, it is an offset from the end of the file; the imported content will exclude the
            /// last endLine lines.</summary>
            [Google.Apis.Util.RequestParameterAttribute("endLine", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<int> EndLine { get; set; }

            /// <summary>Whether the imported CSV must have the same number of column values for each row. If true,
            /// throws an exception if the CSV does not have the same number of columns. If false, rows with fewer
            /// column values will be padded with empty values. Default is true.</summary>
            [Google.Apis.Util.RequestParameterAttribute("isStrict", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<bool> IsStrict { get; set; }

            /// <summary>The index of the first line from which to start importing, inclusive. Default is 0.</summary>
            [Google.Apis.Util.RequestParameterAttribute("startLine", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<int> StartLine { get; set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "replaceRows"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "POST"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "tables/{tableId}/replace"; }
            }

            /// <summary>Initializes ReplaceRows parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "tableId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "tableId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "delimiter", new Google.Apis.Discovery.Parameter
                    {
                        Name = "delimiter",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "encoding", new Google.Apis.Discovery.Parameter
                    {
                        Name = "encoding",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "endLine", new Google.Apis.Discovery.Parameter
                    {
                        Name = "endLine",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "isStrict", new Google.Apis.Discovery.Parameter
                    {
                        Name = "isStrict",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "startLine", new Google.Apis.Discovery.Parameter
                    {
                        Name = "startLine",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Replaces rows of an existing table. Current rows remain visible until all replacement rows are
        /// ready.</summary>

        /// <param name="tableId">Table whose rows will be replaced.</param>
        /// <param name="stream">The stream to upload.</param>
        /// <param name="contentType">The content type of the stream to upload.</param>
        public virtual ReplaceRowsMediaUpload ReplaceRows(string tableId, System.IO.Stream stream, string contentType)
        {
            return new ReplaceRowsMediaUpload(service, tableId, stream, contentType);
        }

        /// <summary>ReplaceRows media upload which supports resumable upload.</summary>
        public class ReplaceRowsMediaUpload : Google.Apis.Upload.ResumableUpload<string, Google.Apis.Fusiontables.v2.Data.Task>
        {

            /// <summary>Data format for the response.</summary>
            /// [default: json]
            [Google.Apis.Util.RequestParameterAttribute("alt", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<AltEnum> Alt { get; set; }

            /// <summary>Data format for the response.</summary>
            public enum AltEnum
            {
                /// <summary>Responses with Content-Type of text/csv</summary>
                [Google.Apis.Util.StringValueAttribute("csv")]
                Csv,
                /// <summary>Responses with Content-Type of application/json</summary>
                [Google.Apis.Util.StringValueAttribute("json")]
                Json,
            }

            /// <summary>Selector specifying which fields to include in a partial response.</summary>
            [Google.Apis.Util.RequestParameterAttribute("fields", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string Fields { get; set; }

            /// <summary>API key. Your API key identifies your project and provides you with API access, quota, and
            /// reports. Required unless you provide an OAuth 2.0 token.</summary>
            [Google.Apis.Util.RequestParameterAttribute("key", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string Key { get; set; }

            /// <summary>OAuth 2.0 token for the current user.</summary>
            [Google.Apis.Util.RequestParameterAttribute("oauth_token", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string OauthToken { get; set; }

            /// <summary>Returns response with indentations and line breaks.</summary>
            /// [default: true]
            [Google.Apis.Util.RequestParameterAttribute("prettyPrint", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<bool> PrettyPrint { get; set; }

            /// <summary>Available to use for quota purposes for server-side applications. Can be any arbitrary string
            /// assigned to a user, but should not exceed 40 characters. Overrides userIp if both are
            /// provided.</summary>
            [Google.Apis.Util.RequestParameterAttribute("quotaUser", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string QuotaUser { get; set; }

            /// <summary>IP address of the site where the request originates. Use this if you want to enforce per-user
            /// limits.</summary>
            [Google.Apis.Util.RequestParameterAttribute("userIp", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string UserIp { get; set; }


            /// <summary>Table whose rows will be replaced.</summary>
            [Google.Apis.Util.RequestParameterAttribute("tableId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string TableId { get; private set; }

            /// <summary>The delimiter used to separate cell values. This can only consist of a single character.
            /// Default is ,.</summary>
            [Google.Apis.Util.RequestParameterAttribute("delimiter", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string Delimiter { get; set; }

            /// <summary>The encoding of the content. Default is UTF-8. Use 'auto-detect' if you are unsure of the
            /// encoding.</summary>
            [Google.Apis.Util.RequestParameterAttribute("encoding", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string Encoding { get; set; }

            /// <summary>The index of the line up to which data will be imported. Default is to import the entire file.
            /// If endLine is negative, it is an offset from the end of the file; the imported content will exclude the
            /// last endLine lines.</summary>
            [Google.Apis.Util.RequestParameterAttribute("endLine", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<int> EndLine { get; set; }

            /// <summary>Whether the imported CSV must have the same number of column values for each row. If true,
            /// throws an exception if the CSV does not have the same number of columns. If false, rows with fewer
            /// column values will be padded with empty values. Default is true.</summary>
            [Google.Apis.Util.RequestParameterAttribute("isStrict", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<bool> IsStrict { get; set; }

            /// <summary>The index of the first line from which to start importing, inclusive. Default is 0.</summary>
            [Google.Apis.Util.RequestParameterAttribute("startLine", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<int> StartLine { get; set; }

            /// <summary>Constructs a new ReplaceRows media upload instance.</summary>
            public ReplaceRowsMediaUpload(Google.Apis.Services.IClientService service, string
             tableId, System.IO.Stream stream, string contentType)
                : base(service, string.Format("/{0}/{1}{2}", "upload", service.BasePath, "tables/{tableId}/replace"), "POST", stream, contentType)
            {
                TableId = tableId;
            }
        }

        /// <summary>Updates an existing table. Unless explicitly requested, only the name, description, and attribution
        /// will be updated.</summary>
        /// <param name="body">The body of the request.</param>
        /// <param name="tableId">ID of the table that is being updated.</param>
        public virtual UpdateRequest Update(Google.Apis.Fusiontables.v2.Data.Table body, string tableId)
        {
            return new UpdateRequest(service, body, tableId);
        }

        /// <summary>Updates an existing table. Unless explicitly requested, only the name, description, and attribution
        /// will be updated.</summary>
        public class UpdateRequest : FusiontablesBaseServiceRequest<Google.Apis.Fusiontables.v2.Data.Table>
        {
            /// <summary>Constructs a new Update request.</summary>
            public UpdateRequest(Google.Apis.Services.IClientService service, Google.Apis.Fusiontables.v2.Data.Table body, string tableId)
                : base(service)
            {
                TableId = tableId;
                Body = body;
                InitParameters();
            }


            /// <summary>ID of the table that is being updated.</summary>
            [Google.Apis.Util.RequestParameterAttribute("tableId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string TableId { get; private set; }

            /// <summary>Whether the view definition is also updated. The specified view definition replaces the
            /// existing one. Only a view can be updated with a new definition.</summary>
            [Google.Apis.Util.RequestParameterAttribute("replaceViewDefinition", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<bool> ReplaceViewDefinition { get; set; }


            /// <summary>Gets or sets the body of this request.</summary>
            Google.Apis.Fusiontables.v2.Data.Table Body { get; set; }

            ///<summary>Returns the body of the request.</summary>
            protected override object GetBody() { return Body; }

            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "update"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "PUT"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "tables/{tableId}"; }
            }

            /// <summary>Initializes Update parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "tableId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "tableId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "replaceViewDefinition", new Google.Apis.Discovery.Parameter
                    {
                        Name = "replaceViewDefinition",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }
    }

    /// <summary>The "task" collection of methods.</summary>
    public class TaskResource
    {
        private const string Resource = "task";

        /// <summary>The service which this resource belongs to.</summary>
        private readonly Google.Apis.Services.IClientService service;

        /// <summary>Constructs a new resource.</summary>
        public TaskResource(Google.Apis.Services.IClientService service)
        {
            this.service = service;

        }


        /// <summary>Deletes a specific task by its ID, unless that task has already started running.</summary>
        /// <param name="tableId">Table from which the task is being deleted.</param>
        /// <param name="taskId">The
        /// identifier of the task to delete.</param>
        public virtual DeleteRequest Delete(string tableId, string taskId)
        {
            return new DeleteRequest(service, tableId, taskId);
        }

        /// <summary>Deletes a specific task by its ID, unless that task has already started running.</summary>
        public class DeleteRequest : FusiontablesBaseServiceRequest<string>
        {
            /// <summary>Constructs a new Delete request.</summary>
            public DeleteRequest(Google.Apis.Services.IClientService service, string tableId, string taskId)
                : base(service)
            {
                TableId = tableId;
                TaskId = taskId;
                InitParameters();
            }


            /// <summary>Table from which the task is being deleted.</summary>
            [Google.Apis.Util.RequestParameterAttribute("tableId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string TableId { get; private set; }

            /// <summary>The identifier of the task to delete.</summary>
            [Google.Apis.Util.RequestParameterAttribute("taskId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string TaskId { get; private set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "delete"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "DELETE"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "tables/{tableId}/tasks/{taskId}"; }
            }

            /// <summary>Initializes Delete parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "tableId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "tableId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "taskId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "taskId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Retrieves a specific task by its ID.</summary>
        /// <param name="tableId">Table to which the task belongs.</param>
        /// <param name="taskId">The identifier of the
        /// task to get.</param>
        public virtual GetRequest Get(string tableId, string taskId)
        {
            return new GetRequest(service, tableId, taskId);
        }

        /// <summary>Retrieves a specific task by its ID.</summary>
        public class GetRequest : FusiontablesBaseServiceRequest<Google.Apis.Fusiontables.v2.Data.Task>
        {
            /// <summary>Constructs a new Get request.</summary>
            public GetRequest(Google.Apis.Services.IClientService service, string tableId, string taskId)
                : base(service)
            {
                TableId = tableId;
                TaskId = taskId;
                InitParameters();
            }


            /// <summary>Table to which the task belongs.</summary>
            [Google.Apis.Util.RequestParameterAttribute("tableId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string TableId { get; private set; }

            /// <summary>The identifier of the task to get.</summary>
            [Google.Apis.Util.RequestParameterAttribute("taskId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string TaskId { get; private set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "get"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "GET"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "tables/{tableId}/tasks/{taskId}"; }
            }

            /// <summary>Initializes Get parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "tableId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "tableId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "taskId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "taskId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Retrieves a list of tasks.</summary>
        /// <param name="tableId">Table whose tasks are being listed.</param>
        public virtual ListRequest List(string tableId)
        {
            return new ListRequest(service, tableId);
        }

        /// <summary>Retrieves a list of tasks.</summary>
        public class ListRequest : FusiontablesBaseServiceRequest<Google.Apis.Fusiontables.v2.Data.TaskList>
        {
            /// <summary>Constructs a new List request.</summary>
            public ListRequest(Google.Apis.Services.IClientService service, string tableId)
                : base(service)
            {
                TableId = tableId;
                InitParameters();
            }


            /// <summary>Table whose tasks are being listed.</summary>
            [Google.Apis.Util.RequestParameterAttribute("tableId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string TableId { get; private set; }

            /// <summary>Maximum number of tasks to return. Default is 5.</summary>
            /// [minimum: 0]
            [Google.Apis.Util.RequestParameterAttribute("maxResults", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<long> MaxResults { get; set; }

            /// <summary>Continuation token specifying which result page to return.</summary>
            [Google.Apis.Util.RequestParameterAttribute("pageToken", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string PageToken { get; set; }

            /// <summary>Index of the first result returned in the current page.</summary>
            [Google.Apis.Util.RequestParameterAttribute("startIndex", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<long> StartIndex { get; set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "list"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "GET"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "tables/{tableId}/tasks"; }
            }

            /// <summary>Initializes List parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "tableId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "tableId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "maxResults", new Google.Apis.Discovery.Parameter
                    {
                        Name = "maxResults",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "pageToken", new Google.Apis.Discovery.Parameter
                    {
                        Name = "pageToken",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "startIndex", new Google.Apis.Discovery.Parameter
                    {
                        Name = "startIndex",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }
    }

    /// <summary>The "template" collection of methods.</summary>
    public class TemplateResource
    {
        private const string Resource = "template";

        /// <summary>The service which this resource belongs to.</summary>
        private readonly Google.Apis.Services.IClientService service;

        /// <summary>Constructs a new resource.</summary>
        public TemplateResource(Google.Apis.Services.IClientService service)
        {
            this.service = service;

        }


        /// <summary>Deletes a template</summary>
        /// <param name="tableId">Table from which the template is being deleted</param>
        /// <param
        /// name="templateId">Identifier for the template which is being deleted</param>
        public virtual DeleteRequest Delete(string tableId, int templateId)
        {
            return new DeleteRequest(service, tableId, templateId);
        }

        /// <summary>Deletes a template</summary>
        public class DeleteRequest : FusiontablesBaseServiceRequest<string>
        {
            /// <summary>Constructs a new Delete request.</summary>
            public DeleteRequest(Google.Apis.Services.IClientService service, string tableId, int templateId)
                : base(service)
            {
                TableId = tableId;
                TemplateId = templateId;
                InitParameters();
            }


            /// <summary>Table from which the template is being deleted</summary>
            [Google.Apis.Util.RequestParameterAttribute("tableId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string TableId { get; private set; }

            /// <summary>Identifier for the template which is being deleted</summary>
            [Google.Apis.Util.RequestParameterAttribute("templateId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual int TemplateId { get; private set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "delete"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "DELETE"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "tables/{tableId}/templates/{templateId}"; }
            }

            /// <summary>Initializes Delete parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "tableId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "tableId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "templateId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "templateId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Retrieves a specific template by its id</summary>
        /// <param name="tableId">Table to which the template belongs</param>
        /// <param name="templateId">Identifier for
        /// the template that is being requested</param>
        public virtual GetRequest Get(string tableId, int templateId)
        {
            return new GetRequest(service, tableId, templateId);
        }

        /// <summary>Retrieves a specific template by its id</summary>
        public class GetRequest : FusiontablesBaseServiceRequest<Google.Apis.Fusiontables.v2.Data.Template>
        {
            /// <summary>Constructs a new Get request.</summary>
            public GetRequest(Google.Apis.Services.IClientService service, string tableId, int templateId)
                : base(service)
            {
                TableId = tableId;
                TemplateId = templateId;
                InitParameters();
            }


            /// <summary>Table to which the template belongs</summary>
            [Google.Apis.Util.RequestParameterAttribute("tableId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string TableId { get; private set; }

            /// <summary>Identifier for the template that is being requested</summary>
            [Google.Apis.Util.RequestParameterAttribute("templateId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual int TemplateId { get; private set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "get"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "GET"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "tables/{tableId}/templates/{templateId}"; }
            }

            /// <summary>Initializes Get parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "tableId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "tableId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "templateId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "templateId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Creates a new template for the table.</summary>
        /// <param name="body">The body of the request.</param>
        /// <param name="tableId">Table for which a new template is being created</param>
        public virtual InsertRequest Insert(Google.Apis.Fusiontables.v2.Data.Template body, string tableId)
        {
            return new InsertRequest(service, body, tableId);
        }

        /// <summary>Creates a new template for the table.</summary>
        public class InsertRequest : FusiontablesBaseServiceRequest<Google.Apis.Fusiontables.v2.Data.Template>
        {
            /// <summary>Constructs a new Insert request.</summary>
            public InsertRequest(Google.Apis.Services.IClientService service, Google.Apis.Fusiontables.v2.Data.Template body, string tableId)
                : base(service)
            {
                TableId = tableId;
                Body = body;
                InitParameters();
            }


            /// <summary>Table for which a new template is being created</summary>
            [Google.Apis.Util.RequestParameterAttribute("tableId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string TableId { get; private set; }


            /// <summary>Gets or sets the body of this request.</summary>
            Google.Apis.Fusiontables.v2.Data.Template Body { get; set; }

            ///<summary>Returns the body of the request.</summary>
            protected override object GetBody() { return Body; }

            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "insert"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "POST"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "tables/{tableId}/templates"; }
            }

            /// <summary>Initializes Insert parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "tableId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "tableId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Retrieves a list of templates.</summary>
        /// <param name="tableId">Identifier for the table whose templates are being requested</param>
        public virtual ListRequest List(string tableId)
        {
            return new ListRequest(service, tableId);
        }

        /// <summary>Retrieves a list of templates.</summary>
        public class ListRequest : FusiontablesBaseServiceRequest<Google.Apis.Fusiontables.v2.Data.TemplateList>
        {
            /// <summary>Constructs a new List request.</summary>
            public ListRequest(Google.Apis.Services.IClientService service, string tableId)
                : base(service)
            {
                TableId = tableId;
                InitParameters();
            }


            /// <summary>Identifier for the table whose templates are being requested</summary>
            [Google.Apis.Util.RequestParameterAttribute("tableId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string TableId { get; private set; }

            /// <summary>Maximum number of templates to return. Optional. Default is 5.</summary>
            /// [minimum: 0]
            [Google.Apis.Util.RequestParameterAttribute("maxResults", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<long> MaxResults { get; set; }

            /// <summary>Continuation token specifying which results page to return. Optional.</summary>
            [Google.Apis.Util.RequestParameterAttribute("pageToken", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string PageToken { get; set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "list"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "GET"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "tables/{tableId}/templates"; }
            }

            /// <summary>Initializes List parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "tableId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "tableId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "maxResults", new Google.Apis.Discovery.Parameter
                    {
                        Name = "maxResults",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "pageToken", new Google.Apis.Discovery.Parameter
                    {
                        Name = "pageToken",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Updates an existing template. This method supports patch semantics.</summary>
        /// <param name="body">The body of the request.</param>
        /// <param name="tableId">Table to which the updated template belongs</param>
        /// <param
        /// name="templateId">Identifier for the template that is being updated</param>
        public virtual PatchRequest Patch(Google.Apis.Fusiontables.v2.Data.Template body, string tableId, int templateId)
        {
            return new PatchRequest(service, body, tableId, templateId);
        }

        /// <summary>Updates an existing template. This method supports patch semantics.</summary>
        public class PatchRequest : FusiontablesBaseServiceRequest<Google.Apis.Fusiontables.v2.Data.Template>
        {
            /// <summary>Constructs a new Patch request.</summary>
            public PatchRequest(Google.Apis.Services.IClientService service, Google.Apis.Fusiontables.v2.Data.Template body, string tableId, int templateId)
                : base(service)
            {
                TableId = tableId;
                TemplateId = templateId;
                Body = body;
                InitParameters();
            }


            /// <summary>Table to which the updated template belongs</summary>
            [Google.Apis.Util.RequestParameterAttribute("tableId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string TableId { get; private set; }

            /// <summary>Identifier for the template that is being updated</summary>
            [Google.Apis.Util.RequestParameterAttribute("templateId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual int TemplateId { get; private set; }


            /// <summary>Gets or sets the body of this request.</summary>
            Google.Apis.Fusiontables.v2.Data.Template Body { get; set; }

            ///<summary>Returns the body of the request.</summary>
            protected override object GetBody() { return Body; }

            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "patch"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "PATCH"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "tables/{tableId}/templates/{templateId}"; }
            }

            /// <summary>Initializes Patch parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "tableId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "tableId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "templateId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "templateId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Updates an existing template</summary>
        /// <param name="body">The body of the request.</param>
        /// <param name="tableId">Table to which the updated template belongs</param>
        /// <param
        /// name="templateId">Identifier for the template that is being updated</param>
        public virtual UpdateRequest Update(Google.Apis.Fusiontables.v2.Data.Template body, string tableId, int templateId)
        {
            return new UpdateRequest(service, body, tableId, templateId);
        }

        /// <summary>Updates an existing template</summary>
        public class UpdateRequest : FusiontablesBaseServiceRequest<Google.Apis.Fusiontables.v2.Data.Template>
        {
            /// <summary>Constructs a new Update request.</summary>
            public UpdateRequest(Google.Apis.Services.IClientService service, Google.Apis.Fusiontables.v2.Data.Template body, string tableId, int templateId)
                : base(service)
            {
                TableId = tableId;
                TemplateId = templateId;
                Body = body;
                InitParameters();
            }


            /// <summary>Table to which the updated template belongs</summary>
            [Google.Apis.Util.RequestParameterAttribute("tableId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string TableId { get; private set; }

            /// <summary>Identifier for the template that is being updated</summary>
            [Google.Apis.Util.RequestParameterAttribute("templateId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual int TemplateId { get; private set; }


            /// <summary>Gets or sets the body of this request.</summary>
            Google.Apis.Fusiontables.v2.Data.Template Body { get; set; }

            ///<summary>Returns the body of the request.</summary>
            protected override object GetBody() { return Body; }

            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "update"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "PUT"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "tables/{tableId}/templates/{templateId}"; }
            }

            /// <summary>Initializes Update parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "tableId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "tableId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "templateId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "templateId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }
    }
}

namespace Google.Apis.Fusiontables.v2.Data
{    

    /// <summary>Specifies the minimum and maximum values, the color, opacity, icon and weight of a bucket within a
    /// StyleSetting.</summary>
    public class Bucket : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Color of line or the interior of a polygon in #RRGGBB format.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("color")]
        public virtual string Color { get; set; } 

        /// <summary>Icon name used for a point.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("icon")]
        public virtual string Icon { get; set; } 

        /// <summary>Maximum value in the selected column for a row to be styled according to the bucket color, opacity,
        /// icon, or weight.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("max")]
        public virtual System.Nullable<double> Max { get; set; } 

        /// <summary>Minimum value in the selected column for a row to be styled according to the bucket color, opacity,
        /// icon, or weight.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("min")]
        public virtual System.Nullable<double> Min { get; set; } 

        /// <summary>Opacity of the color: 0.0 (transparent) to 1.0 (opaque).</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("opacity")]
        public virtual System.Nullable<double> Opacity { get; set; } 

        /// <summary>Width of a line (in pixels).</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("weight")]
        public virtual System.Nullable<int> Weight { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>Specifies the details of a column in a table.</summary>
    public class Column : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Identifier of the base column. If present, this column is derived from the specified base
        /// column.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("baseColumn")]
        public virtual Column.BaseColumnData BaseColumn { get; set; } 

        /// <summary>Identifier for the column.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("columnId")]
        public virtual System.Nullable<int> ColumnId { get; set; } 

        /// <summary>JSON schema for interpreting JSON in this column.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("columnJsonSchema")]
        public virtual string ColumnJsonSchema { get; set; } 

        /// <summary>JSON object containing custom column properties.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("columnPropertiesJson")]
        public virtual string ColumnPropertiesJson { get; set; } 

        /// <summary>Column description.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("description")]
        public virtual string Description { get; set; } 

        /// <summary>Format pattern. Acceptable values are DT_DATE_MEDIUMe.g Dec 24, 2008 DT_DATE_SHORTfor example
        /// 12/24/08 DT_DATE_TIME_MEDIUMfor example Dec 24, 2008 8:30:45 PM DT_DATE_TIME_SHORTfor example 12/24/08 8:30
        /// PM DT_DAY_MONTH_2_DIGIT_YEARfor example 24/12/08 DT_DAY_MONTH_2_DIGIT_YEAR_TIMEfor example 24/12/08 20:30
        /// DT_DAY_MONTH_2_DIGIT_YEAR_TIME_MERIDIANfor example 24/12/08 8:30 PM DT_DAY_MONTH_4_DIGIT_YEARfor example
        /// 24/12/2008 DT_DAY_MONTH_4_DIGIT_YEAR_TIMEfor example 24/12/2008 20:30
        /// DT_DAY_MONTH_4_DIGIT_YEAR_TIME_MERIDIANfor example 24/12/2008 8:30 PM DT_ISO_YEAR_MONTH_DAYfor example
        /// 2008-12-24 DT_ISO_YEAR_MONTH_DAY_TIMEfor example 2008-12-24 20:30:45 DT_MONTH_DAY_4_DIGIT_YEARfor example
        /// 12/24/2008 DT_TIME_LONGfor example 8:30:45 PM UTC-6 DT_TIME_MEDIUMfor example 8:30:45 PM DT_TIME_SHORTfor
        /// example 8:30 PM DT_YEAR_ONLYfor example 2008 HIGHLIGHT_UNTYPED_CELLSHighlight cell data that does not match
        /// the data type NONENo formatting (default) NUMBER_CURRENCYfor example $1234.56 NUMBER_DEFAULTfor example
        /// 1,234.56 NUMBER_INTEGERfor example 1235 NUMBER_NO_SEPARATORfor example 1234.56 NUMBER_PERCENTfor example
        /// 123,456% NUMBER_SCIENTIFICfor example 1E3 STRING_EIGHT_LINE_IMAGEDisplays thumbnail images as tall as eight
        /// lines of text STRING_FOUR_LINE_IMAGEDisplays thumbnail images as tall as four lines of text
        /// STRING_JSON_TEXTAllows editing of text as JSON in UI STRING_JSON_LISTAllows editing of text as a JSON list
        /// in UI STRING_LINKTreats cell as a link (must start with http:// or https://) STRING_ONE_LINE_IMAGEDisplays
        /// thumbnail images as tall as one line of text STRING_VIDEO_OR_MAPDisplay a video or map thumbnail</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("formatPattern")]
        public virtual string FormatPattern { get; set; } 

        /// <summary>Column graph predicate. Used to map table to graph data model (subject,predicate,object) See W3C
        /// Graph-based Data Model.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("graphPredicate")]
        public virtual string GraphPredicate { get; set; } 

        /// <summary>The kind of item this is. For a column, this is always fusiontables#column.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>Name of the column.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("name")]
        public virtual string Name { get; set; } 

        /// <summary>Type of the column.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("type")]
        public virtual string Type { get; set; } 

        /// <summary>List of valid values used to validate data and supply a drop-down list of values in the web
        /// application.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("validValues")]
        public virtual System.Collections.Generic.IList<string> ValidValues { get; set; } 

        /// <summary>If true, data entered via the web application is validated.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("validateData")]
        public virtual System.Nullable<bool> ValidateData { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
        

        /// <summary>Identifier of the base column. If present, this column is derived from the specified base
        /// column.</summary>
        public class BaseColumnData
        {
            /// <summary>The id of the column in the base table from which this column is derived.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("columnId")]
            public virtual System.Nullable<int> ColumnId { get; set; } 

            /// <summary>Offset to the entry in the list of base tables in the table definition.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("tableIndex")]
            public virtual System.Nullable<int> TableIndex { get; set; } 

        }
    }    

    /// <summary>Represents a list of columns in a table.</summary>
    public class ColumnList : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>List of all requested columns.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("items")]
        public virtual System.Collections.Generic.IList<Column> Items { get; set; } 

        /// <summary>The kind of item this is. For a column list, this is always fusiontables#columnList.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>Token used to access the next page of this result. No token is displayed if there are no more pages
        /// left.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("nextPageToken")]
        public virtual string NextPageToken { get; set; } 

        /// <summary>Total number of columns for the table.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("totalItems")]
        public virtual System.Nullable<int> TotalItems { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>Represents a Geometry object.</summary>
    public class Geometry : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The list of geometries in this geometry collection.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("geometries")]
        public virtual System.Collections.Generic.IList<object> Geometries { get; set; } 

        [Newtonsoft.Json.JsonPropertyAttribute("geometry")]
        public virtual object GeometryValue { get; set; } 

        /// <summary>Type: A collection of geometries.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("type")]
        public virtual string Type { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>Represents an import request.</summary>
    public class Import : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The kind of item this is. For an import, this is always fusiontables#import.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>The number of rows received from the import request.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("numRowsReceived")]
        public virtual System.Nullable<long> NumRowsReceived { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>Represents a line geometry.</summary>
    public class Line : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The coordinates that define the line.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("coordinates")]
        public virtual System.Collections.Generic.IList<System.Collections.Generic.IList<System.Nullable<double>>> Coordinates { get; set; } 

        /// <summary>Type: A line geometry.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("type")]
        public virtual string Type { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>Represents a LineStyle within a StyleSetting</summary>
    public class LineStyle : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Color of the line in #RRGGBB format.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("strokeColor")]
        public virtual string StrokeColor { get; set; } 

        /// <summary>Column-value, gradient or buckets styler that is used to determine the line color and
        /// opacity.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("strokeColorStyler")]
        public virtual StyleFunction StrokeColorStyler { get; set; } 

        /// <summary>Opacity of the line : 0.0 (transparent) to 1.0 (opaque).</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("strokeOpacity")]
        public virtual System.Nullable<double> StrokeOpacity { get; set; } 

        /// <summary>Width of the line in pixels.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("strokeWeight")]
        public virtual System.Nullable<int> StrokeWeight { get; set; } 

        /// <summary>Column-value or bucket styler that is used to determine the width of the line.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("strokeWeightStyler")]
        public virtual StyleFunction StrokeWeightStyler { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>Represents a point object.</summary>
    public class Point : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The coordinates that define the point.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("coordinates")]
        public virtual System.Collections.Generic.IList<System.Nullable<double>> Coordinates { get; set; } 

        /// <summary>Point: A point geometry.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("type")]
        public virtual string Type { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>Represents a PointStyle within a StyleSetting</summary>
    public class PointStyle : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Name of the icon. Use values defined in
        /// http://www.google.com/fusiontables/DataSource?dsrcid=308519</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("iconName")]
        public virtual string IconName { get; set; } 

        /// <summary>Column or a bucket value from which the icon name is to be determined.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("iconStyler")]
        public virtual StyleFunction IconStyler { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>Represents a polygon object.</summary>
    public class Polygon : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The coordinates that define the polygon.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("coordinates")]
        public virtual System.Collections.Generic.IList<System.Collections.Generic.IList<System.Collections.Generic.IList<System.Nullable<double>>>> Coordinates { get; set; } 

        /// <summary>Type: A polygon geometry.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("type")]
        public virtual string Type { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>Represents a PolygonStyle within a StyleSetting</summary>
    public class PolygonStyle : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Color of the interior of the polygon in #RRGGBB format.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("fillColor")]
        public virtual string FillColor { get; set; } 

        /// <summary>Column-value, gradient, or bucket styler that is used to determine the interior color and opacity
        /// of the polygon.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("fillColorStyler")]
        public virtual StyleFunction FillColorStyler { get; set; } 

        /// <summary>Opacity of the interior of the polygon: 0.0 (transparent) to 1.0 (opaque).</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("fillOpacity")]
        public virtual System.Nullable<double> FillOpacity { get; set; } 

        /// <summary>Color of the polygon border in #RRGGBB format.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("strokeColor")]
        public virtual string StrokeColor { get; set; } 

        /// <summary>Column-value, gradient or buckets styler that is used to determine the border color and
        /// opacity.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("strokeColorStyler")]
        public virtual StyleFunction StrokeColorStyler { get; set; } 

        /// <summary>Opacity of the polygon border: 0.0 (transparent) to 1.0 (opaque).</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("strokeOpacity")]
        public virtual System.Nullable<double> StrokeOpacity { get; set; } 

        /// <summary>Width of the polyon border in pixels.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("strokeWeight")]
        public virtual System.Nullable<int> StrokeWeight { get; set; } 

        /// <summary>Column-value or bucket styler that is used to determine the width of the polygon border.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("strokeWeightStyler")]
        public virtual StyleFunction StrokeWeightStyler { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>Represents a response to a SQL statement.</summary>
    public class Sqlresponse : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Columns in the table.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("columns")]
        public virtual System.Collections.Generic.IList<string> Columns { get; set; } 

        /// <summary>The kind of item this is. For responses to SQL queries, this is always
        /// fusiontables#sqlresponse.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>The rows in the table. For each cell we print out whatever cell value (e.g., numeric, string)
        /// exists. Thus it is important that each cell contains only one value.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("rows")]
        public virtual System.Collections.Generic.IList<System.Collections.Generic.IList<object>> Rows { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>Represents a StyleFunction within a StyleSetting</summary>
    public class StyleFunction : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Bucket function that assigns a style based on the range a column value falls into.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("buckets")]
        public virtual System.Collections.Generic.IList<Bucket> Buckets { get; set; } 

        /// <summary>Name of the column whose value is used in the style.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("columnName")]
        public virtual string ColumnName { get; set; } 

        /// <summary>Gradient function that interpolates a range of colors based on column value.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("gradient")]
        public virtual StyleFunction.GradientData Gradient { get; set; } 

        /// <summary>Stylers can be one of three kinds: "fusiontables#fromColumn if the column value is to be used as
        /// is, i.e., the column values can have colors in #RRGGBBAA format or integer line widths or icon names;
        /// fusiontables#gradient if the styling of the row is to be based on applying the gradient function on the
        /// column value; or fusiontables#buckets if the styling is to based on the bucket into which the the column
        /// value falls.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
        

        /// <summary>Gradient function that interpolates a range of colors based on column value.</summary>
        public class GradientData
        {
            /// <summary>Array with two or more colors.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("colors")]
            public virtual System.Collections.Generic.IList<GradientData.ColorsData> Colors { get; set; } 

            /// <summary>Higher-end of the interpolation range: rows with this value will be assigned to
            /// colors[n-1].</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("max")]
            public virtual System.Nullable<double> Max { get; set; } 

            /// <summary>Lower-end of the interpolation range: rows with this value will be assigned to
            /// colors[0].</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("min")]
            public virtual System.Nullable<double> Min { get; set; } 

            

            public class ColorsData
            {
                /// <summary>Color in #RRGGBB format.</summary>
                [Newtonsoft.Json.JsonPropertyAttribute("color")]
                public virtual string Color { get; set; } 

                /// <summary>Opacity of the color: 0.0 (transparent) to 1.0 (opaque).</summary>
                [Newtonsoft.Json.JsonPropertyAttribute("opacity")]
                public virtual System.Nullable<double> Opacity { get; set; } 

            }
        }
    }    

    /// <summary>Represents a complete StyleSettings object. The primary key is a combination of the tableId and a
    /// styleId.</summary>
    public class StyleSetting : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The kind of item this is. A StyleSetting contains the style definitions for points, lines, and
        /// polygons in a table. Since a table can have any one or all of them, a style definition can have point, line
        /// and polygon style definitions.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>Style definition for points in the table.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("markerOptions")]
        public virtual PointStyle MarkerOptions { get; set; } 

        /// <summary>Optional name for the style setting.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("name")]
        public virtual string Name { get; set; } 

        /// <summary>Style definition for polygons in the table.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("polygonOptions")]
        public virtual PolygonStyle PolygonOptions { get; set; } 

        /// <summary>Style definition for lines in the table.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("polylineOptions")]
        public virtual LineStyle PolylineOptions { get; set; } 

        /// <summary>Identifier for the style setting (unique only within tables).</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("styleId")]
        public virtual System.Nullable<int> StyleId { get; set; } 

        /// <summary>Identifier for the table.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("tableId")]
        public virtual string TableId { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>Represents a list of styles for a given table.</summary>
    public class StyleSettingList : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>All requested style settings.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("items")]
        public virtual System.Collections.Generic.IList<StyleSetting> Items { get; set; } 

        /// <summary>The kind of item this is. For a style list, this is always fusiontables#styleSettingList
        /// .</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>Token used to access the next page of this result. No token is displayed if there are no more
        /// styles left.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("nextPageToken")]
        public virtual string NextPageToken { get; set; } 

        /// <summary>Total number of styles for the table.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("totalItems")]
        public virtual System.Nullable<int> TotalItems { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>Represents a table.</summary>
    public class Table : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Attribution assigned to the table.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("attribution")]
        public virtual string Attribution { get; set; } 

        /// <summary>Optional link for attribution.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("attributionLink")]
        public virtual string AttributionLink { get; set; } 

        /// <summary>Base table identifier if this table is a view or merged table.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("baseTableIds")]
        public virtual System.Collections.Generic.IList<string> BaseTableIds { get; set; } 

        /// <summary>Default JSON schema for validating all JSON column properties.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("columnPropertiesJsonSchema")]
        public virtual string ColumnPropertiesJsonSchema { get; set; } 

        /// <summary>Columns in the table.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("columns")]
        public virtual System.Collections.Generic.IList<Column> Columns { get; set; } 

        /// <summary>Description assigned to the table.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("description")]
        public virtual string Description { get; set; } 

        /// <summary>Variable for whether table is exportable.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("isExportable")]
        public virtual System.Nullable<bool> IsExportable { get; set; } 

        /// <summary>The kind of item this is. For a table, this is always fusiontables#table.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>Name assigned to a table.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("name")]
        public virtual string Name { get; set; } 

        /// <summary>SQL that encodes the table definition for derived tables.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("sql")]
        public virtual string Sql { get; set; } 

        /// <summary>Encrypted unique alphanumeric identifier for the table.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("tableId")]
        public virtual string TableId { get; set; } 

        /// <summary>JSON object containing custom table properties.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("tablePropertiesJson")]
        public virtual string TablePropertiesJson { get; set; } 

        /// <summary>JSON schema for validating the JSON table properties.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("tablePropertiesJsonSchema")]
        public virtual string TablePropertiesJsonSchema { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>Represents a list of tables.</summary>
    public class TableList : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>List of all requested tables.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("items")]
        public virtual System.Collections.Generic.IList<Table> Items { get; set; } 

        /// <summary>The kind of item this is. For table list, this is always fusiontables#tableList.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>Token used to access the next page of this result. No token is displayed if there are no more pages
        /// left.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("nextPageToken")]
        public virtual string NextPageToken { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>A background task on a table, initiated for time- or resource-consuming operations such as changing
    /// column types or deleting all rows.</summary>
    public class Task : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Type of the resource. This is always "fusiontables#task".</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>Task percentage completion.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("progress")]
        public virtual string Progress { get; set; } 

        /// <summary>false while the table is busy with some other task. true if this background task is currently
        /// running.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("started")]
        public virtual System.Nullable<bool> Started { get; set; } 

        /// <summary>Identifier for the task.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("taskId")]
        public virtual System.Nullable<long> TaskId { get; set; } 

        /// <summary>Type of background task.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("type")]
        public virtual string Type { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>Represents a list of tasks for a table.</summary>
    public class TaskList : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>List of all requested tasks.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("items")]
        public virtual System.Collections.Generic.IList<Task> Items { get; set; } 

        /// <summary>Type of the resource. This is always "fusiontables#taskList".</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>Token used to access the next page of this result. No token is displayed if there are no more pages
        /// left.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("nextPageToken")]
        public virtual string NextPageToken { get; set; } 

        /// <summary>Total number of tasks for the table.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("totalItems")]
        public virtual System.Nullable<int> TotalItems { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>Represents the contents of InfoWindow templates.</summary>
    public class Template : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>List of columns from which the template is to be automatically constructed. Only one of body or
        /// automaticColumns can be specified.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("automaticColumnNames")]
        public virtual System.Collections.Generic.IList<string> AutomaticColumnNames { get; set; } 

        /// <summary>Body of the template. It contains HTML with {column_name} to insert values from a particular
        /// column. The body is sanitized to remove certain tags, e.g., script. Only one of body or automaticColumns can
        /// be specified.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("body")]
        public virtual string Body { get; set; } 

        /// <summary>The kind of item this is. For a template, this is always fusiontables#template.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>Optional name assigned to a template.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("name")]
        public virtual string Name { get; set; } 

        /// <summary>Identifier for the table for which the template is defined.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("tableId")]
        public virtual string TableId { get; set; } 

        /// <summary>Identifier for the template, unique within the context of a particular table.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("templateId")]
        public virtual System.Nullable<int> TemplateId { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>Represents a list of templates for a given table.</summary>
    public class TemplateList : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>List of all requested templates.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("items")]
        public virtual System.Collections.Generic.IList<Template> Items { get; set; } 

        /// <summary>The kind of item this is. For a template list, this is always fusiontables#templateList .</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>Token used to access the next page of this result. No token is displayed if there are no more pages
        /// left.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("nextPageToken")]
        public virtual string NextPageToken { get; set; } 

        /// <summary>Total number of templates for the table.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("totalItems")]
        public virtual System.Nullable<int> TotalItems { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }
}
